﻿/**********************************************************************
 * @file   GUISEASubSysBeamDialog.h
 * @brief  创建梁的界面窗口
 * @author liuzhonghua (liuzhonghuaszch@163.com)
 * @date   2024-11-01
 *********************************************************************/
#ifndef _GUISEASubSysBeamDialog_H
#define _GUISEASubSysBeamDialog_H

#include "GUISEASubSysBaseDialog.h"

namespace Ui
{
    class GUISEASubSysBeamDialog;
}

namespace Acoustics
{
    class FITKSEASubSysBeam;
}

class QStandardItemModel;

namespace GUI
{
    /**
     * @brief Beam create or edit widget
     * @author liuzhonghua (liuzhonghuaszch@163.com)
     * @date 2024-10-23
     */
    class GUISubSystemDialogAPI GUISEASubSysBeamDialog :public GUISEASubSysBaseDialog
    {
        Q_OBJECT;
    public:
        /**
         * @brief creat constructor
         * @param[i]  obj            My Param doc
         * @param[i]  oper           operator
         * @author liuzhonghua (liuzhonghuaszch@163.com)
         * @date 2024-10-23
         */
        GUISEASubSysBeamDialog(Acoustics::FITKSEASubSysBeam* obj, Core::FITKActionOperator* oper, QWidget* parent = nullptr);
        /**
         * @brief Destroy object
         * @author liuzhonghua (liuzhonghuaszch@163.com)
         * @date 2024-10-23
         */
        virtual ~GUISEASubSysBeamDialog();
        /**
         * @brief init
         * @author liuzhonghua (liuzhonghuaszch@163.com)
         * @date 2024-10-23
         */
        virtual void initData() override;

    protected slots:

        /**
         * @brief cencel button clicked slot
         * @author liuzhonghua (liuzhonghuaszch@163.com)
         * @date 2024-10-23
         */
        void on_pushButton_Cancel_clicked();
        /**
         * @brief create button clicked slot
         * @author liuzhonghua (liuzhonghuaszch@163.com)
         * @date 2024-10-23
         */
        void on_pushButton_OK_clicked();

        /**
         * @brief    comboBox PhysicalProp currentIndexChanged slot
         * @param[i] index
         * @return   void
         * @author   liuzhonghua (liuzhonghuaszch@163.com)
         * @date     2024-11-07
         */
        void on_comboBox_PhysicalProp_currentIndexChanged(int index);

    protected:
        /**
         * @brief    初始化物理属性下拉列表
         * @return   void
         * @author   liuzhonghua (liuzhonghuaszch@163.com)
         * @date     2024-11-07
         */
        void initPhysicalPropData();
        /**
         * @brief    初始化损耗因子下拉列表
         * @return   void
         * @author   liuzhonghua (liuzhonghuaszch@163.com)
         * @date     2024-11-04
         */
        void initDampingData();
        /**
         * @brief    初始化模态密度的下拉列表
         * @return   void
         * @author   liuzhonghua (liuzhonghuaszch@163.com)
         * @date     2024-11-07
         */
        void initModelDensityData();
        /**
         * @brief    初始化物理属性数据
         * @return   void
         * @author   liuzhonghua (liuzhonghuaszch@163.com)
         * @date     2024-11-12
         */
        void initPropData();
        /**
         * @brief    初始化几何属性数据
         * @return   void
         * @author   liuzhonghua (liuzhonghuaszch@163.com)
         * @date     2024-11-12
         */
        void initGeometryData();
        /**
         * @brief    设置用户数据
         * @author   wangning (2185896382@qq.com)
         * @date     2024-11-14
         */
        void initUserData();
        /**
         * @brief    Get the Data Form Widget object
         * @return   void
         * @author   liuzhonghua (liuzhonghuaszch@163.com)
         * @date     2024-10-24
         */
        virtual void getDataFormWidget();
        /**
         * @brief    从界面里获取设置的名称
         * @return   QString
         * @author   liuzhonghua (liuzhonghuaszch@163.com)
         * @date     2024-12-10
         */
        virtual QString getNameFormWidget() override;

    protected:
        /**
         * @brief ui object
         * @author liuzhonghua (liuzhonghuaszch@163.com)
         * @date 2024-10-23
         */
        Ui::GUISEASubSysBeamDialog* _ui = nullptr;
        /**
         * @brief  梁节点表格
         * @author liuzhonghua (liuzhonghuaszch@163.com)
         * @date   2024-11-11
         */
        QStandardItemModel* _tableView_modelBeamNodes{};
        /**
         * @brief  梁方向点表格
         * @author liuzhonghua (liuzhonghuaszch@163.com)
         * @date   2024-11-11
         */
        QStandardItemModel* _tableView_modelOrientationNode{};
    };
}

#endif
